import * as types from '../actions/types';

/*
schoolList实际上是包含schoolObjList和schoolData这两个key的一个对象
schoolObjList 供Menu选择后显示使用[{school_1:{title:'a', id:5}}, ...]
schoolData  供Menu使用 [{label:'', value:},...]
*/
export default function school(schoolList = {}, action) {
  switch (action.type) {
  	case types.SET_SCHOOL_LIST:
  		return action.schoolList;
  	case types.CLEAR_SCHOOL_LIST:
  		return {};
  	default:
  		return schoolList;
  }
}  